<template>
  <div>
    <svg :style="{ width, height }">
      <use :xlink:href="prefix + name" :fill="color"></use>
    </svg>
  </div>
</template>

<script lang="ts" setup name="index">
defineProps({
  //前缀
  prefix: {
    type: String,
    default: '#icon-',
  },
  //后缀
  name: String,
  // 接收颜色样式
  color: {
    type: String,
    default: 'black',
  },
  width: {
    type: String,
    default: '50px',
  },
  height: {
    type: String,
    default: '50px',
  },
})
</script>
<style scoped lang="scss"></style>
